# Maintainer: George Rawlinson <grawlinson@archlinux.org>

pkgname=python-sphinxcontrib-fulltoc
pkgver=1.2
pkgrel=3
pkgdesc='Sphinx extension to show full table of contents in the sidebar'
arch=('any')
url='https://github.com/sphinx-contrib/fulltoc'
license=('Apache')
depends=('python' 'python-sphinx')
makedepends=(
  'git'
  'python-build'
  'python-installer'
  'python-wheel'
  'python-setuptools'
  'python-pbr'
)
_commit='ddbd9545fd2b8103cf31ded01b457772c4579e5c'
source=("$pkgname::git+$url#commit=$_commit")
b2sums=('SKIP')

pkgver() {
  cd "$pkgname"

  git describe --tags | sed 's/^v//'
}

build() {
  cd "$pkgname"

  # issue opened regarding deprecation warnings
  # https://github.com/sphinx-contrib/fulltoc/issues/24
  python -m build --wheel --no-isolation
}

package() {
  cd "$pkgname"

  python -m installer --destdir="$pkgdir" dist/*.whl
}

# vim: ts=2 sw=2 et
